/*
** ex2.c for printf in /home/nadali_t//local/Projets/CprgElem/printf/TPprintf
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Tue Dec 13 17:00:58 2011 thomas nadalie
** Last update Tue Dec 13 17:44:08 2011 thomas nadalie
*/

#include	<stdarg.h>
#include	<stdlib.h>

void	my_putchar(char c)
{
  write(1, &c, 1);
}

void	my_putstr(char *str)
{
  int	i;

  i = 0;
  while (str[i] != '\0')
    my_putchar(str[i++]);
}

void	exo(int i, int j, char *str, ...)
{
  va_list	toto;

  va_start(toto, str);
  my_putstr(va_arg(toto, char *));
  my_putstr(va_arg(toto, char *));
  printf("%d  ", va_arg(toto, int));
  va_end(toto);
}

int	main()
{
  exo(42, 40, "coucou ", "chemise ", "est une loutre ", 42);
  return (0);
}
